package com.htc.controller;

import com.htc.common.ActionEvent;
import com.htc.constants.Constants;
import com.htc.dlc.DetailNewsActivity;
import com.htc.dlc.MainActivity;
import com.htc.dlc.NewsActivity;
import com.htc.dlc.RetailersActivity;
import com.htc.model.utils.NewsModel;
import com.htc.model.utils.RetailerModel;

public class RetailersController {
	public static RetailersController instance;

	public static RetailersController getInstance() {
		if (instance == null)
			instance = new RetailersController();
		return instance;
	}

	public void handleViewEvent(ActionEvent e) {
		switch (e.action) {
		case Constants.GET_RETAILER:
			RetailerModel.getInstance().handleControllerEvent(e);
			break;
			

		default:
			break;
		}
	}

	public void handleModelViewEvent(ActionEvent e) {
		switch (e.action) {
		case Constants.GET_RETAILER:
			RetailersActivity sender = (RetailersActivity) e.sender;
			sender.handleControllerViewEvent(e);
			break;

		default:
			break;
		}
	}
}
